﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace NGA
{
    public class ItemViewModel : INotifyPropertyChanged
    {
        private string _title;
        public string ItemTitle
        {
            get
            {
                return _title;
            }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("ItemTitle");
                }
            }
        }

        private string _author;
        public string ItemAuthor
        {
            get
            {
                return _author;
            }
            set
            {
                if (value != _author)
                {
                    _author = value;
                    NotifyPropertyChanged("ItemAuthor");
                }
            }
        }

        private string _tail;
        public string ItemTail
        {
            get
            {
                return _tail;
            }
            set
            {
                if (value != _tail)
                {
                    _tail = value;
                    NotifyPropertyChanged("ItemTail");
                }
            }
        }

        private string _tail2;
        public string ItemTail2
        {
            get
            {
                return _tail2;
            }
            set
            {
                if (value != _tail2)
                {
                    _tail2 = value;
                    NotifyPropertyChanged("ItemTail2");
                }
            }
        }

        private string _href;
        public string ItemLink
        {
            get
            {
                return _href;
            }
            set
            {
                if (value != _href)
                {
                    _href = value;
                    NotifyPropertyChanged("ItemLink");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}